import {defineStore} from "pinia";

export const tabStore = defineStore('tabStore', {
    state: ():any=> {
        return {
            tabsList:[]
        }
    },
    getters:{
       getTabsList(state){
           return state.tabsList
       }
    },
    actions:{
        addTabs(tab:any){
            if (tab.path == '/login') return;
            if (this.tabsList.some((item : any) => item.path === tab.path)) return
            this.tabsList.push(tab)
        }
    }
})
